package com.wzcl.app.dao.model;


import com.wzcl.app.dao.model.common.Base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

@Data
@Entity
@Table(name = "videoResources",
        indexes = {
                @Index(columnList = "resourceId"),
                @Index(columnList = "resourceType")
        }
)
@ApiModel(value = "课程视频资源表")
@EntityListeners(AuditingEntityListener.class)
public class VideoResources implements Base {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @ApiModelProperty(value = "资源ID")
    private Integer resourceId;

    @ApiModelProperty(value = "资源类型")
    private Integer resourceType;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "资源对应的key值")
    private String fileKey;

    @ApiModelProperty(value = "封面图")
    private String previewImage;

    @ApiModelProperty(value = "当前资源收费类型")
    private Integer chargeType;

    @ApiModelProperty(value = "排序字段")
    private Integer orderNo;
}
